/**
 * 
 */
package de.cbf.cam.dsa.entity.edit.item.persister.mock.service;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;

import de.cbf.cam.dsa.entity.edit.item.persister.mock.Service_PersisterMock_EntityItem;
import de.cbf.cam.dsa.entity.edit.item.resolver.persister_interface.IServicePersister_EntityItem;

/**
 * @author Nebelritter
 *
 */
public class ServiceFactory_PersisterMock_EntityItem implements ServiceFactory<IServicePersister_EntityItem> {

	protected Service_PersisterMock_EntityItem service;

	@Override
	public IServicePersister_EntityItem getService(
			Bundle bundle,
			ServiceRegistration<IServicePersister_EntityItem> registration) {
		if(service == null){
			service = new Service_PersisterMock_EntityItem();			
		}
		return service;
	}

	@Override
	public void ungetService(
			Bundle bundle,
			ServiceRegistration<IServicePersister_EntityItem> registration,
			IServicePersister_EntityItem service) {
		this.service = null;		
	}

	
}
